package org.ricks.common.conf;


/**
 * @author chenwei
 * @Title:
 * @Package
 * @Description:
 * @date 2020/8/615:25
 */
@org.ricks.common.conf.ConfProperties(prefix = "redis.pool.")
public class JedisPoolConf {

    private static int maxTotal;

    private static int maxIdle;

    private static int minIdle;

    private static int maxWaitMillis;

    private static boolean testOnBorrow;

    private static boolean testOnReturn;

    public static void setMaxTotal(int maxTotal) {
        JedisPoolConf.maxTotal = maxTotal;
    }

    public static void setMaxIdle(int maxIdle) {
        JedisPoolConf.maxIdle = maxIdle;
    }

    public static void setMinIdle(int minIdle) {
        JedisPoolConf.minIdle = minIdle;
    }

    public static void setMaxWaitMillis(int maxWaitMillis) {
        JedisPoolConf.maxWaitMillis = maxWaitMillis;
    }

    public static void setTestOnBorrow(boolean testOnBorrow) {
        JedisPoolConf.testOnBorrow = testOnBorrow;
    }

    public static void setTestOnReturn(boolean testOnReturn) {
        JedisPoolConf.testOnReturn = testOnReturn;
    }

    public static int getMaxTotal(){
        return maxTotal;
    }

    public static int getMaxIdle() {
        return maxIdle;
    }

    public static int getMinIdle() {
        return minIdle;
    }

    public static int getMaxWaitMillis() {
        return maxWaitMillis;
    }

    public static boolean isTestOnBorrow() {
        return testOnBorrow;
    }

    public static boolean isTestOnReturn() {
        return testOnReturn;
    }
}
